﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using MixScript.BLL;
using MixScriptWeb.control;
using MixScript.BLL.FI;

namespace MixScriptWeb.Accounting
{
    public partial class detailView : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dthdr = new DataTable();
            cAccHeader gaj = new cAccHeader();
            string editID = Request.QueryString["slipid"];
            dthdr = gaj.loadJournalHeader(editID);
            if (dthdr.Rows.Count > 0)
            {

                lblDate.Text = String.Format("{0:dd-MMM-yyyy}", dthdr.Rows[0].ItemArray[0].ToString()); //date
                lblNumb.Text = dthdr.Rows[0].ItemArray[1].ToString(); //slipno
                lblCurr.Text = dthdr.Rows[0].ItemArray[2].ToString(); //curr
                lbldesc.Text = dthdr.Rows[0].ItemArray[3].ToString(); //desc

            }

            gvList.DataSource = gaj.loadJournalDetail(editID);
            gvList.DataBind();
        }
    }
}